<?php
class CaptchaController extends Pidguin_Controller_Public_Action
{
	public function init()
	{
		$this->_disableView();
	}
	
	public function updateAction()
	{
		if (!$this->getRequest()->isXmlHttpRequest()) {
			throw new Zend_Controller_Action_Exception('Not ajax');
		}
		
		$captcha_form = new Application_Form_News_Comment_Captcha();
		$this->_helper->json(array(
			'form' => $captcha_form->render()
		));
	}
}